package com.ruoyi.web.service.impl;

import com.ruoyi.web.domain.Paiban;
import com.ruoyi.web.mapper.PaibanMapper;
import com.ruoyi.web.service.IPaibanService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 医生排班Service业务层处理
 * 
 * @author 蛤蛤
 * @date 2022-12-27
 */
@Service
public class PaibanServiceImpl implements IPaibanService 
{
    @Autowired
    private PaibanMapper paibanMapper;

    /**
     * 查询医生排班
     * 
     * @param paiid 医生排班主键
     * @return 医生排班
     */
    @Override
    public Paiban selectPaibanByPaiid(Long paiid)
    {
        return paibanMapper.selectPaibanByPaiid(paiid);
    }

    /**
     * 查询医生排班列表
     * 
     * @param paiban 医生排班
     * @return 医生排班
     */
    @Override
    public List<Paiban> selectPaibanList(Paiban paiban)
    {
        return paibanMapper.selectPaibanList(paiban);
    }

    /**
     * 新增医生排班
     * 
     * @param paiban 医生排班
     * @return 结果
     */
    @Override
    public int insertPaiban(Paiban paiban)
    {
        return paibanMapper.insert(paiban);
    }

    /**
     * 修改医生排班
     * 
     * @param paiban 医生排班
     * @return 结果
     */
    @Override
    public int updatePaiban(Paiban paiban)
    {
        return paibanMapper.updateById(paiban);
    }

    /**
     * 批量删除医生排班
     * 
     * @param paiids 需要删除的医生排班主键
     * @return 结果
     */
    @Override
    public int deletePaibanByPaiids(Long[] paiids)
    {
        return paibanMapper.deletePaibanByPaiids(paiids);
    }

    /**
     * 删除医生排班信息
     * 
     * @param paiid 医生排班主键
     * @return 结果
     */
    @Override
    public int deletePaibanByPaiid(Long paiid)
    {
        return paibanMapper.deleteById(paiid);
    }
}
